<?php
  //Buffer larger content areas like the main page content
  ob_start();
  require_once("auth.php");

?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Suppliers</title> 
 
 <style>
.tdclas{
font-family:Calibri, Arial;
font-size:18px;
font-stretch:extra-condensed;
color:#062F07
}
.rtdclass{
font-family:Calibri, Arial;
font-size:14px;
color:#000000;
}
</style>


</head>

<body >
<?php 
include("config.php");
if(isset($_REQUEST['id']))
{
$id=$_REQUEST['id'];
$data=mysql_query("select * from suppliers where SupplierID='$id'");
$no=mysql_num_rows($data);
if($no!=0)
{
	while($rec=mysql_fetch_assoc($data))
	{

?>
<fieldset >
<legend style="color:#FD0002">Suppliers Deatils </legend>
<table width="80%"style="font-family:Calibri; background-color:#FFFFFF" cellpadding="5" cellspacing="6" align="center">
<tr>
<td width="28%" class="tdclas">Supplier Name :</td>
<td width="25%" class="rtdclass"><?php echo $rec['SupplierName']; ?></td>
<td width="22%" class="tdclas">Company Name :</td>
<td width="25%" class="rtdclass"><?php echo $rec['CompanyName']; ?></td>
</tr>
<tr>
<td class="tdclas">City :</td>
<td class="rtdclass"><?php echo $rec['City']; ?></td>
<td class="tdclas">State :</td>
<td class="rtdclass"><?php echo $rec['State']; ?></td>
</tr>
<tr>
<td class="tdclas">Address :</td>
<td class="rtdclass">  <?php echo $rec['Address']; ?></td>
<td class="tdclas">Country :</td>
<td class="rtdclass"><?php echo $rec['Country']; ?></td>
</tr>
<tr>
<td class="tdclas">Postal Code :</td>
<td class="rtdclass"><?php echo $rec['PostalCode']; ?></td>
<td class="tdclas">Phone :</td>
<td class="rtdclass"><?php echo $rec['Phone']; ?></td>
</tr>
<tr>
<td class="tdclas">Email :</td>
<td class="rtdclass"><?php echo $rec['Email']; ?></td>
<td class="tdclas">Type Goods :</td>
<td class="rtdclass"><?php echo $rec['TypeGoods']; ?></td>
</tr>
<tr>
<td class="tdclas">Current Order Details : </td>
<td class="rtdclass"> <?php echo $rec['Curr_Ord_Details']; ?></td>
<td class="tdclas">Coustomer : </td>
<td class="rtdclass">
							<?php 
							$id1=$rec['CustomerID'];
							
							$data1=mysql_query("select * from customers where serial=$id1");
							$no1=mysql_num_rows($data1);
							if($no1>0)
							{
								while($rec1=mysql_fetch_assoc($data1))
								{
								

							$name=$rec1['name']; 
							}
							}
							?>
							<?php echo $name;  ?>
							</td>

</tr>
<tr>
</table>


</fieldset>
	<?php
	}
	}
	}
	else
	{
	?>

	<?php
	}
	?>
	</body></html>
	 <?php
  //Assign all Page Specific variables
  $pagemaincontent = ob_get_contents();
  ob_end_clean();
  $pagetitle = "Suppliers";
  //Apply the template
  include("master.php");
?>    